All files / src/app/posts posts.service.ts

50% Statements 3/6
100% Branches 0/0
25% Functions 1/4
40% Lines 2/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21          1x 6x                            
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
 
@Injectable({providedIn: 'root'})
export class PostsService {
  constructor(private http: HttpClient) {}
 
  create(post): Observable<any> {
    return this.http.post(``, post);
  }
 
  fetch(): Observable<any[]> {
    return this.http.get<any[]>(``)
  }
 
  remove(id: number): Observable<any> {
    return this.http.delete<void>(`${id}`)
  }
}